alist = [34,56,12,34,65,78,89,23,12]
for i in range(0,len(alist)-1):
    for j in range(0,len(alist)-i-1):
        if alist[j]>alist[j+1]:
            alist[j],alist[j+1]=alist[j+1],alist[j]

print(alist)